package com.djl.sqtg.service.impl;

import com.djl.sqtg.entity.Cart;
import com.djl.sqtg.entity.CartVO;
import com.djl.sqtg.entity.Review;
import com.djl.sqtg.mapper.CartMapper;
import com.djl.sqtg.mapper.ReviewMapper;
import com.djl.sqtg.service.ICartService;
import com.djl.sqtg.service.IReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReviewServiceImpl implements IReviewService {
    @Autowired
    private ReviewMapper reviewMapper;


    @Override
    public List<Review> getAllReview() {
        return reviewMapper.getAllReview();
    }

    @Override
    public Integer updateReviewState(Integer rid,Integer state) {
        return reviewMapper.updateReviewState(rid,state);
    }

    @Override
    public Integer addReview(Review review) {
        return reviewMapper.addReview(review);
    }

    @Override
    public Integer replyReview(Integer rid,String reply) {
        return reviewMapper.replyReview(rid,reply);
    }

    @Override
    public Integer delReview(Integer rid) {
        return reviewMapper.delReview(rid);
    }

    @Override
    public Integer getAllNum() {
        return reviewMapper.getAllNum();
    }
}
